//
//  historyDetailTableViewController.m
//  EasyGo
//
//  Created by newhuidong on 16/1/30.
//  Copyright © 2016年 HuiDong. All rights reserved.
//

#import "historyDetailTableViewController.h"

@interface historyDetailTableViewController (){
    
    UIImageView *navBarHairlineImageView;

    
}
@property (weak, nonatomic) IBOutlet UILabel *OnDriver;
@property (weak, nonatomic) IBOutlet UIButton *phoneLabel;
@property (weak, nonatomic) IBOutlet UIButton *phoneLabel2;

@end

@implementation historyDetailTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"订单详情";
    
    self.OnDriver.layer.cornerRadius=3;
    self.OnDriver.layer.masksToBounds=YES;
    self.phoneLabel.layer.cornerRadius=3;
    self.phoneLabel2.layer.cornerRadius=3;
    
    navBarHairlineImageView = [self findHairlineImageViewUnder:self.navigationController.navigationBar];

    
}


#pragma 隐藏导航栏下面的一条线
- (UIImageView *)findHairlineImageViewUnder:(UIView *)view {
    if ([view isKindOfClass:UIImageView.class] && view.bounds.size.height <= 1.0) {
        return (UIImageView *)view;
    }
    for (UIView *subview in view.subviews) {
        UIImageView *imageView = [self findHairlineImageViewUnder:subview];
        if (imageView) {
            return imageView;
        }
    }
    return nil;
}
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    navBarHairlineImageView.hidden = YES;
    
}
- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    navBarHairlineImageView.hidden = NO;
}



-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
 
    return 20;
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    
    return 0.1;
    
}
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
    
        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];

}

@end
